package com.ruoyi.system.mapper;

import java.math.BigDecimal;
import java.util.List;

import com.ruoyi.system.domain.HatchetOrderPayment;	

/**
 * 订单 数据层
 * 
 * @author ruoyi
 * @date 2019-02-20
 */
public interface HatchetOrderPaymentMapper 
{
	/**
     * 查询订单信息
     * 
     * @param iD 订单ID
     * @return 订单信息
     */
	public HatchetOrderPayment selectHatchetOrderPaymentById(String iD);
	
	/**
     * 查询订单列表
     * 
     * @param hatchetOrderPayment 订单信息
     * @return 订单集合
     */
	public List<HatchetOrderPayment> selectHatchetOrderPaymentList(HatchetOrderPayment hatchetOrderPayment);
	
	/**
     * 新增订单
     * 
     * @param hatchetOrderPayment 订单信息
     * @return 结果
     */
	public int insertHatchetOrderPayment(HatchetOrderPayment hatchetOrderPayment);
	
	/**
     * 修改订单
     * 
     * @param hatchetOrderPayment 订单信息
     * @return 结果
     */
	public int updateHatchetOrderPayment(HatchetOrderPayment hatchetOrderPayment);
	
	/**
     * 删除订单
     * 
     * @param iD 订单ID
     * @return 结果
     */
	public int deleteHatchetOrderPaymentById(String iD);
	
	/**
     * 批量删除订单
     * 
     * @param iDs 需要删除的数据ID
     * @return 结果
     */
	public int deleteHatchetOrderPaymentByIds(String[] iDs);

	public List<HatchetOrderPayment>  selectHatchetOrderPaymentByOrder(String orderNo);

	public List<HatchetOrderPayment> selectOrderPaymentByTrade(HatchetOrderPayment hatchetOrderPayment);
	
	public List<HatchetOrderPayment> selectOrderPaymentZX(HatchetOrderPayment hatchetOrderPayment);

	/**
	 * 代理商查询订单
	 * @param hatchetOrderPayment 里面包含有商户的id集合
	 * @return
	 */
	public List<HatchetOrderPayment> selectOrderPaymentForDLS(HatchetOrderPayment hatchetOrderPayment);

	/**
	 * 代还订单查询
	 * @param hatchetOrderPayment
	 * @return
	 */								 	
	public List<HatchetOrderPayment> selectOrderPaymentReplaceForDLS(HatchetOrderPayment hatchetOrderPayment);
	
	/**
	 * 查询订单总金额
	 * @param hatchetOrderPayment
	 * @return
	 */
	public BigDecimal selectSumMoney(HatchetOrderPayment hatchetOrderPayment);
	
	
	/**
	 * 查看订单数量
	 * @param orderPayment
	 * @return
	 */
	public Long selectOrderPaymentCount(HatchetOrderPayment orderPayment);

	public BigDecimal selectZXSumMoney(HatchetOrderPayment hatchetOrderPayment);

	public BigDecimal selectSumMoneyForPlan(HatchetOrderPayment hatchetOrderPayment);
	
	/**
	 * 按天分组查询订单金额和数量
	 * @param orderPayment
	 * @return
	 */
	public List<HatchetOrderPayment> selectHatchetOrderPaymentMoneyByDay(HatchetOrderPayment orderPayment);
	
	/**
	 * 客服查询订单
	 * @param hatchetOrderPayment
	 * @return
	 */
	public List<HatchetOrderPayment> selectOrderPaymentForKefu(HatchetOrderPayment hatchetOrderPayment);

	public BigDecimal selectSumMoneyForKefu(HatchetOrderPayment hatchetOrderPayment);
	
	
}